package com.ssy.lingxi.member.merchant.api.model.vo.paas;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 设置权限关联菜单、按钮接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2020-06-20
 */
public class RoleAuthVO implements Serializable {
    private static final long serialVersionUID = 8095148693631600561L;

    /**
     * 角色id
     */
    @NotNull(message = "id要大于0")
    @Positive(message = "id要大于0")
    private Long id;

    /**
     * Map<菜单key， List<按钮Id>>。Key为菜单的Id，value为菜单关联按钮的Id
     */
    @NotEmpty(message = "请勾选菜单和按钮设置权限")
    private Map<Long, List<Long>> auth;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Map<Long, List<Long>> getAuth() {
        return auth;
    }

    public void setAuth(Map<Long, List<Long>> auth) {
        this.auth = auth;
    }
}
